<?php
session_start();
      if (isset($_SESSION['k_username'])) {
include ("conexion.inc.php");
$link = Conectarse();
$editadopor=$_SESSION['k_username'];
$fecha = date("y-m-d h:i:s");
mysql_select_db("gotica_ordencompras" ,$link);
?>
<html><head><title>Proveedor Registrado con Exito</title></head>
<body>
<?php
$prov = $_POST[nombre];
$ruc = $_POST[ruc];
$tel = $_POST[telefono];
$dir = $_POST[direccion];
$sqa  = "INSERT INTO proveedor ( N_proveedor , T_RUC, T_telefono, T_direccion) ";
$sqa .= "VALUES (
'$prov',
'$ruc',
'$tel',
'$dir')";
$resulta = mysql_query($sqa);


?>
<SCRIPT LANGUAGE="javascript">
location.href = "nuevoproveedor.php";
</SCRIPT>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>
